<template>
  <div>
    <nav-bar title="帮助与反馈"></nav-bar>
    <div id="help">

    </div>
    <div id="callback">
      <van-form @submit="submit">
        <van-field
            v-model="message"
            rows="8"
            autosize
            label="反馈"
            type="textarea"
            maxlength="500"
            placeholder="请输入留言"
            show-word-limit
            name="message"
            :rules="[{ required: true, message: '不能为空' }]"
        />
        <div style="margin: 16px;">
          <van-button round block type="info" native-type="submit">
            提交
          </van-button>
        </div>
      </van-form>
    </div>
  </div>
</template>

<script>
import NavBar from "components/NavBar/NavBar";
import _g from "assets/js/global";

export default {
  name: "Help",
  data() {
    return {
      message: ''
    }
  },
  components: {
    NavBar
  },
  methods: {
    submit() {
      let toast = _g.showToast("loading", "提交中");
      setTimeout(() => {
        toast.type = "success";
        toast.message = "提交成功";
        setTimeout(() => {
          toast.clear();
          this.$router.back();
        }, 1000)
      }, 1000);
    }
  }
}
</script>

<style scoped>

</style>
